<!DOCTYPE html>
<html lang="zh-CN">
<head>
  <meta charset="utf-8">
  <title>Python Drag</title>
  <!-- blockly -->
  <script src="../node_modules/blockly/blockly_compressed.js"></script>
  <script src="../node_modules/blockly/blocks_compressed.js"></script>
  <script src="../node_modules/blockly/msg/en.js"></script>
  <script src="../node_modules/blockly/python_compressed.js"></script>

  <!-- skulpt -->
  <script src="../node_modules/skulpt/dist/skulpt.min.js"></script>
  <script src="../node_modules/skulpt/dist/skulpt-stdlib.js"></script>

  <!-- <script src="../dist/production.js"></script> -->

  <!-- main.js -->
  <script src="main.js"></script>

  <!-- functions -->
  <script src="comments-function.js"></script>
  <script src="attribute-function.js"></script>
  <script src="import-function.js"></script>
  <script src="multiple-assign.js"></script>
  <script src="def-procedures.js"></script>
  <script src="argument-keyword.js"></script>
  <script src="infunc-logic.js"></script>
  <script src="ast-call.js"></script>
  <script src="operators-math.js"></script>
  <script src="ast-comment.js"></script>
  <script src="ast-raw.js"></script>
  <script src="ast-return.js"></script>
  <script src="parse-int.js"></script>
  <script src="range-function.js"></script>
  <script src="add-function.js"></script>
  <script src="sum-function.js"></script>
  <script src="yield-function.js"></script>
  <script src="input-function.js"></script>
  <script src="output-function.js"></script>
  <script src="with-keyword.js"></script>
  <script src="lambda-function.js"></script>
  <script src="math.js"></script>
  <script src="function.js"></script>
  <script src="str-function.js" ></script>
  <script src="reverse-function.js" ></script>
  <script src="assert-function.js"></script>
  <script src="is-keyword.js"></script>
  <script src="math-floor.js"></script>
  <script src="function-ascii.js"></script>
  <script src="bool.js"></script>
  <script src="raise-function.js"></script>
  <script src="ceil-math.js"></script>
  <script src="bin-function.js"></script>
  <script src="try-except-else.js"></script>
  <script src="pass-logic.js"></script>
  <script src="in-function.js"></script>
  <script src="class-class.js"></script>
  <script src="ascii-function.js"></script>
  <script src="break-function.js"></script>
  <script src="dict-function.js"></script>
  <script src="if-toblock.js"></script>
  <script src="for-toblock.js"></script>
  <script src="continue-iteration.js"></script>
  <script src="print-function.js"></script>
  <script src="abs-function.js"></script>
  <script src="PythonToBlock.js"></script>


  <style>
    body {
      background-color: #fff;
      font-family: sans-serif;
    }
    h1 {
      font-weight: normal;
      font-size: 140%;
    }
    table {
      display: flex;
      justify-content: center;
    }
    #primaryDiv {
      width: 600px;
      height: 600px;
    }
    #toolbox {
      display: none;
    }
    #showCode {
      width: 600px;
      height: 600px;
    }
  </style>
</head>
<body onload="init()">
<table width="100%">
  <tr>
    <th>工作区</th>
    <th>代码区</th>
  </tr>
  <tr>
    <td>
      <div id="primaryDiv"></div>
    </td>
    <td>
      <form action="" onsubmit="return false">
        <textarea id="showCode"></textarea>
      </form>
    </td>
  </tr>
</table>
<xml xmlns="https://developers.google.com/blockly/xml" id="toolbox">
  <catagory name="Define" colour="230">
    <block type="function_def"></block>
  </catagory>
  <category name="Logic" categorystyle="logic_category">
    <block type="controls_if"></block>
    <block type="controls_ifelse"></block>
    <block type="logic_compare"></block>
    <block type="logic_operation"></block>
    <block type="logic_negate"></block>
    <block type="logic_boolean"></block>
    <block type="try_judgement"></block>
    <block type="logic_pass_"></block>
  </category>
  <category name="Loops" categorystyle="loop_category">
    <block type="controls_repeat_ext">
      <value name="TIMES">
        <shadow type="math_number">
          <field name="NUM">10</field>
        </shadow>
      </value>
    </block>
    <block type="controls_flow_statements"></block>
    <block type="controls_whileUntil"></block>
  </category>
  <category name="Math" categorystyle="math_category">
    <block type="math_number" gap="32">
      <field name="NUM">123</field>
    </block>
    <block type="math_single">
      <value name="NUM">
        <shadow type="math_number">
          <field name="NUM">9</field>
        </shadow>
      </value>
    </block>
    <block type="math_number_property">
      <value name="NUMBER_TO_CHECK">
        <shadow type="math_number">
          <field name="NUM">0</field>
        </shadow>
      </value>
    </block>
    <block type="math_round"></block>
    <block type="math_on_list"></block>
    <block type="math_single"></block>
    <block type="math_operators"></block>
    <block type="math_instanceof"></block>
    <block type="is_judgement"></block>
    <block type="math_floor"></block>
    <block type="math_ceilkeyword"></block>
  </category>
  <category name="Text" categorystyle="text_category">
    <block type="text"></block>
    <block type="text_multiline"></block>
    <label text="Input/Output:" web-class="ioLabel">
    </label>
    <block type="text_print">
      <value name="TEXT">
        <shadow type="text">
          <field name="TEXT">abc</field>
        </shadow>
      </value>
    </block>
    <block type="text_prompt_ext">
      <value name="TEXT">
        <shadow type="text">
          <field name="TEXT">abc</field>
        </shadow>
      </value>
    </block>
  </category>
  <sep></sep>
  <category name="Colour" categorystyle="colour_category">
    <block type="colour_picker"></block>
    <block type="colour_rgb"></block>
    <block type="colour_blend"></block>
  </category>
  <category name="Lists" categorystyle="list_category">
    <block type="lists_repeat"></block>
    <block type="lists_create_with"></block>
    <block type="lists_create_empty"></block>
    <block type="lists_length"></block>
    <block type="lists_reverse"></block>
    <block type="lists_split"></block>
    <block type="lists_setIndex"></block>
  </category>
  <category name="Input" colour=105>
    <block type="input_function"></block>
  </category>
  <category name="Output" colour=75>
    <block type="print_function"></block>
    <block type="return"></block>
  </category>
  <sep></sep>
  <category name="Variables" categorystyle="variable_category" custom="VARIABLE">
  </category>
  <category name="Functions" categorystyle="procedure_category">
    <block type="range_function"></block>
    <block type="add_function"></block>
    <block type="two_sum_function"></block>
    <block type="single_sum_function"></block>
    <block type="yield_function"></block>
    <block type="with_keyword"></block>
    <block type="procedures_ifreturn"></block>
    <block type="function_pow"></block>
    <block type="function_lambda"></block>
    <block type="function_match"></block>
    <block type="function_match_default"></block>
    <block type="function_case"></block>
    <block type="function_str"></block>
    <block type="function_assert"></block>
    <block type="function_ascii"></block>
    <block type="ast_Raise"></block>
    <block type="in_function"></block>
    <block type="function_reverse"></block>
  </category>
  <category name="Iteration" colour="%{BKY_LOOPS_HUE}">
    <block type="controls_for"></block>
    <block type="controls_forEach"></block>
    <block type="controls_whileUntil"></block>
    <block type="break"></block>
    <block type="continue"></block>
  </category>
  <category name="Canversion" colour="15">
    <block type="parse_int"></block>
    <block type="math_float"></block>
    <block type="function_bool"></block>
    <block type="function_bin"></block>
  </category>
  <sep></sep>
  <category name="Procedures" colour="15" custom="Class">
    <block type="function_def"></block>
    <block type="class_procedure"></block>
  </category>
  <category name="Dictionaries" colour="30">
    <block type="ast_Dict"></block>
    <block type="ast_DictItem"></block>
  </category>
  <category name="Others" colour="45">
    <block type="comments"></block>
  </category>
</xml>
</body>

<!-- CodeMirror -->
<link rel="stylesheet" href="../codemirror-5.65.8/lib/codemirror.css">
<script src="../codemirror-5.65.8/lib/codemirror.js"></script>
<script src="../codemirror-5.65.8/mode/python/python.js"></script>
<script src="codemirror-settings.js"></script>
</html>
